object HighLevelFunc {
  def main(args: Array[String]): Unit = {
    val func = n => "*" * n
    (1 to 5).map(func(_)).foreach(println(_))
    println("+++++++++++++")

    val URLBuilder = (ssl:Boolean, domainName:String) => {
      val schema = if (ssl) "https://" else "http://"
      (endPoint: String, query: String) => s"$schema$domainName/$endPoint?$query"
    }

    val domainName = "www.lagou.com"
    def getURL: (String, String) => String = URLBuilder(true, domainName)
    val endPoint: String = "show"
    val query: String = "id=1"
    val url: String = getURL(endPoint, query)
    println(url)
  }

}
